#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<math.h>
int mainshxhshw()
{
	int shui, i, j, wei;
	for (shui = 0; shui < 100000; shui++)
	{
		i = shui;
		for (wei=0; 0 != i;)
		{
			i = i / 10;
			wei++;
		}
		j = 0;
		for (i = shui; 0 != i; i = i / 10)
		{
			j = j + pow(i % 10, wei);
		}
		if (j == shui)
			printf("%d ", shui);
	}
	printf("");
	return 0;
}